package cn.wenhe9.gulimall.search.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author DuJinliang
 * 2022/4/19
 */
@Data
@Document(indexName = "book")
public class Article {
    @Id
    @Field(type = FieldType.Long)
    private Integer id;

    @Field(index = true, analyzer = "ik_smart", searchAnalyzer = "ik_smart", store = true, type = FieldType.Text)
    private String title;

    private String content;
}
